<include file="__VIEW__/Public/userinfoHead.html" />

<script>
	var ajaxCity = "{|U:'ajaxCity'}";
	var ajaxDist = "{|U:'ajaxDist'}";
	var ajaxCheckNickName = "{|U:'UserInfo/ajaxCheckNickName'}";
</script>
<script type="text/javascript" src="__STATIC__/js/cal/lhgcalendar.min.js"></script>
<script type="text/javascript" src="__VIEW__/js/city.js"></script>
<script type="text/javascript" src="__VIEW__/js/myData.js"></script>
<link href="__STATIC__/uploadify/uploadify.css" type="text/css" rel="stylesheet"></link>

<script>
	
	$(function() {
		$('#birthday').calendar({
			format: 'yyyy/MM/dd HH:mm:ss'
		});
	});
</script>
<link rel="stylesheet" href="__VIEW__/css/mydatum.css" />
<!--个人中心主体-->
<div id="content">
	<!--面包屑-->
	<div class="location">
		您当前的位置：
		<a href="{|U:'Index/Index'}">凡客首页</a> >
		<a href="{|U:'UserInfo/Index'}">我的凡客</a> >
		<a href="{|U:'UserInfo/myData'}">我的资料</a>
	</div>
	<!--面包屑-->
	<div class="main">
		<!--个人中心左边-->
		<include file="__VIEW__/Public/userinfo_left.html" />
		<!--个人中心中心右边-->
		<div class="right">
			<div class="mytitle">
				<p>
					我的资料
				</p>
			</div>
			<!--切换页-->
			<div class="datumDesc">
				<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
				<form action="{|U:'updateMyData'}" method="post" id="myData" >
					<input type="hidden" name="uid" value="{$hd.session.uid}" />
					<input name="face" id="upface"  type="file" style="border:1px solid #999;" /> 类型: *.jpg,*.png 大小: 2000KB
								<script type="text/javascript">
								$(function() {
									//异步处理上传图片
									$('#upface').uploadify({
										'formData': { //POST数据
											'<?php echo session_name();?>': '<?php echo session_id();?>',
										},
										'fileTypeDesc': '上传文件', //上传描述
										'fileTypeExts': '*.jpg;*.png',
										'swf': '__STATIC__/uploadify/uploadify.swf',
										'uploader': '{|U:"uploadFace"}',
										'buttonText': '选择文件',
										'fileSizeLimit': '2000KB',
										'uploadLimit': 1000, //上传文件数
										'width': 65,
//										'debug':true,
										'height': 25,
										'successTimeout': 10, //等待服务器响应时间
										'removeTimeout': 0.2, //成功显示时间
										'onUploadSuccess': function(file, data, response) {
											data = $.parseJSON(data);
											//将当前的图片换成 头像
											$('#face').attr('src','__ROOT__/'+data.face);
											//将当前的隐藏域添加上头像路径
											$('input[name=face]').val(data.face);
											
										}
									});
								});
							</script>
					<div class="faceList" style="margin-bottom:100px;margin-left:30px;">
						<if value="$userInfo.face">
							<img id="face" src="__ROOT__/{$userInfo.face}" alt="" />
							<else/>
							<img id="face" src="__STATIC__/Img/vancl300.jpg" alt="" />
						</if>
						
					</div>
					
					
					<!--列表列表-->
					<div class="formList">
						<div class="form-group">
							<label for=""><span style="color:#B81B22">*</span>用户名：</label>
							<span class="username">{$hd.session.username}</span>
							<input type="hidden" name="oldface" value="{$userInfo.face}" />
						</div>
						<div class="form-group">
							<label for="nickname"><span style="color:#B81B22">*</span>昵 称：</label>
							<input type="text" value="{$userInfo.nickname}" name="nickname" id="nickname" />
							<input type="hidden" name="face" value="{$userInfo.face}" />
						</div>
						<div class="form-group">
							<label for="truename"><span style="color:#B81B22">*</span>真实姓名：</label>
							<input type="text" value="{$userInfo.truename}" name="truename" id="truename" />
						</div>
						<div class="form-group">
							<label for="sex"><span style="color:#B81B22">*</span>性 别：</label>
							<input type="radio" id="sex" name="sex" value="男" <if value="$userInfo.sex=='男'">checked="checked"</if> />男 &nbsp;
							<input type="radio" name="sex" value="女" <if value="$userInfo.sex=='女'">checked="checked"</if> />女
							<span id="hd_sex"></span>
						</div>

						<div class="form-group">
							<label for="birthday"><span style="color:#B81B22">*</span>出生日期：</label>
							<input type="text" name="birthday" id="birthday" value="{$userInfo.birthday|date:'Y/m/d H:i:s',@@}" />
						</div>
						<div class="form-group">
							<label for="truename"><span style="color:#B81B22">*</span>地 区：</label>
							<div class="se">
								<!--省份选择-->
								<select id="province" style="opacity: 1;border:1px solid cornflowerblue;">
									<option value="0" selected="selected">请选择/省份</option>
									<foreach from="$prov" key="$key" value="$val">
										<option value="{$val.provid}" <if value="$area[0]==$val.provid">selected="selected"</if>>{$val.provname}</option>
									</foreach>
								</select>
								<!--城市 -->
								<select style="opacity: 1;border:1px solid cornflowerblue;"  id="city">
									<option value="0" selected="selected">请选择/市级</option>
									<foreach from="$citys" key="$k" value="$v">
										<option value="{$v.cityid}" <if value="$area[1]==$v.cityid">selected="selected"</if>>{$v.cityname}</option>
									</foreach>
								</select>
								<!--地区-->
								<select style="opacity: 1;border:1px solid cornflowerblue;"  id="dist">
									<option value="0" selected="selected">请选择/县</option>
									<foreach from="$dists" key="$k" value="$v">
										<option value="{$v.distid}" <if value="$area[2]==$v.distid">selected="selected"</if>>{$v.dist_name}</option>
									</foreach>
								</select>
								<!--保存所有在地区隐藏表单-->
								<input type="hidden" name="addarea" value="{$userInfo.addarea}" />
							</div>
						</div>
						<div class="form-group">
							<label for="alladdress"><span style="color:#B81B22">*</span>详细地址：</label>
							<input type="text" value="{$userInfo.alladdress}" name="alladdress" id="alladdress" style="width:300px;" />
						</div>
						<div class="form-group">
							<label for="zipcode"><span style="color:#B81B22">*</span>邮编：</label>
							<input type="text" value="{$userInfo.zipcode}" name="zipcode" id="zipcode" />
						</div>
						<div class="form-group">
							<label for="telphone"><span style="color:#B81B22">*</span>电话：</label>
							<input type="text" value="{$userInfo.telphone}" name="telphone" id="telphone" />
						</div>
						<div class="form-group">
							<input type="submit" value="" class="submit" />
						</div>

					</div>
				</form>
			</div>
		</div>
	</div>
</div>
<!--个人中心主体结束-->

<!-- 页脚开始 -->
<include file="__VIEW__/Public/userinfo_foot.html" />
<!-- 页脚结束 -->
</body>

</html>